package com.tian.okhttp.upload

/**
 * @author tiansongtao, Email:tiansongtao@up366.com
 * @date 2021/4/9 11:43
 *
 * 上传文件所需要的参数
 * @param url 上传文件的url
 * @param uploadFileKey 上传文件时构建 multipart/form-data中文件的key
 * @param filePath 上传文件的本地地址
 */
class UploadParams(val url: String, val uploadFileKey: String, val filePath: String) {

    enum class State {
        START,
        FAILED,
        UPLOADING,
        SUCCESS
    }

    open fun initHeaders(headers: MutableMap<String, String>) {}
    open fun initParams(params: MutableMap<String, String>) {}

    open fun uploadCallback(state: State, uploadedLength: Long, totalLength: Long, msg: String) {}
}